<template>
    <div class="home">
        <div class="per-link" v-for="item in myLink" :key="item.name">
            <span class="link-name">{{ item.name }}：</span>
            <span class="link-address" v-if="item.address" @click="toAddress(item.address)">{{
                item.address
            }}</span>
            <span v-if="item.text" class="link-address">{{item.text}}</span>
        </div>
        <img alt="" src="https://gitee.com/jyeontostore/img-bed/raw/master/img/1698846833659.jpg"/>
    </div>
</template>

<script>
export default {
    name: "homePage",
    components: {},
    data() {
        return {
            myLink: [
                {
                    name: "CSDN",
                    address: "https://blog.csdn.net/Twinkle_sone"
                },
                {
                    name: "Gitee",
                    address: "https://gitee.com/zheng_yongtao"
                },
                // {
                //     name: "GitHub",
                //     address: "https://github.com/yongtaozheng"
                // },
                {
                    name: "掘金",
                    address: "https://juejin.cn/user/440244290727294"
                },
                {
                    name: "个人博客",
                    address: "http://jyeontu.xyz/JYeontuBlog/#/home"
                },
                {
                    name: "JYeontu组件库",
                    address: "http://jyeontu.xyz/jvuewheel"
                },
                {
                    name: "微信公众号",
                    text: "『前端也能这么有趣』"
                }
            ]
        };
    },
    methods: {
        toAddress(url) {
            window.open(url);
        }
    },
    mounted() {}
};
</script>

<style lang="scss" scoped>
.home {
    text-align: center;
}
.head-img {
    border-radius: 50% 50%;
    margin-top: 1rem;
}
.per-link {
    margin-top: 1rem;
    font-size: larger;
    .link-address {
        text-decoration: underline;
        color: blue;
        cursor: pointer;
    }
}
</style>